<!-- playground-fold -->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Sample</title>
</head>

<body style="background-color: var(--sapBackgroundColor)">
    <style>
        body {
            height: 420px;
        }

        .popover-content {
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .popover-footer {
            display: flex;
            justify-content: flex-end;
            width: 100%;
            align-items: center;
            padding: 0.5rem 0;
        }

        .center {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100%;
            width: 100%;
        }
    </style>

  <!-- playground-fold-end -->


    <div class="center">
        <ui5-button id="btn1">Open Popover to Bottom</ui5-button>
        <ui5-button id="btn2">Open Popover to Left</ui5-button>
    </div>
   
    <ui5-popover id="popover1" opener="btn1" header-text="Newsletter subscription" placement="Bottom">
        <div class="popover-content">
            <ui5-label for="emailInput" required show-colon>Email</ui5-label>
            <ui5-input id="emailInput" style="min-width: 150px;" placeholder="Enter Email"></ui5-input>
            <ui5-label>Note: If you open the page in mobile, a dialog would be displayed.</ui5-label>
        </div>

        <div slot="footer" class="popover-footer">
            <ui5-button id="closePopoverButton" design="Emphasized">Subscribe</ui5-button>
        </div>
    </ui5-popover>

    <ui5-popover id="popover2" opener="btn2" header-text="Newsletter subscription" placement="Start">
        <div class="popover-content">
            <ui5-label for="emailInput" required show-colon>Email</ui5-label>
            <ui5-input id="emailInput" style="min-width: 150px;" placeholder="Enter Email"></ui5-input>
            <ui5-label>Note: If you open the page in mobile, a dialog would be displayed.</ui5-label>
        </div>
        <div slot="footer" class="popover-footer">
            <ui5-button id="closePopoverButton" design="Emphasized">Subscribe</ui5-button>
        </div>
    </ui5-popover>

    <!-- playground-fold -->
    <script type="module" src="main.js"></script>
</body>

</html>
<!-- playground-fold-end -->
